|
|
|
|
|
|
|
structures in the array that are pointed to by the MappingAddress field. Each SHNAMEMAPPING structure is copied one at a time in a loop into the NameMapping structure. |
|
|
|
|
|
|
|
|
The following line deserves special attention: |
|
|
|
|
|
|
|
|
RtlMoveMemory NameMapping, ByVal CLng(MappingInfo.MappingAddress _
+ Len(NameMapping) * (mappingcounter - 1)), Len(NameMapping) |
|
|
|
|
|
|
|
|
The second parameter shows a calculation of the address of each structure in the array. The MappingInfo.MappingAddress term is the address of the first structure in the array. The (mappingcounter 1) * Len(NameMapping) terms calculate an offset to the correct structure based on the value of the mappingcounter loop variable. |
|
|
|
|
|
|
|
|
The final result is similar to that shown in Figure S31-1. |
|
|
|
|
|
|
|
|
Figure S31-1:
Typical display after copying files to floppy disk |
|
|
|
|
|
|
|
|
This may be the most difficult puzzle in the book. But it best illustrates the types of problems you will face if you want to adopt the newest features in Windows. The Win32 API is vast, and sometimes Microsoft's own documentation and examples fall short. If you sometimes have trouble getting accurate answers from Microsoft's technical support, don't be too criticalthey may not have the information either. In those cases, trust your own ability to experiment, explore, and ultimately figure out how to make the function work. It's quite possible that the only people who will know the solution at that point are you and the 22-year-old recent graduate Microsoft hired six months earlier, who actually wrote the code. |
|
|
|
|
|